import 'package:flutter_demo/core/api/request.dart';
import 'package:flutter_demo/core/model/meal_model.dart';

Future<List<MealModel>> getMealData() async {
  final result = await HttpRequest.request("/meal");

  final mealList = result["meal"];

  List<MealModel> meal = [];
  for (var json in mealList) {
    meal.add(MealModel.fromJson(json));
  }
  return meal;
}